Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change decision letter parsing for eLife articles. #224

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

gnott
Copy link
Member

@gnott gnott commented Mar 25, 2021

Re issue https://github.com/elifesciences/issues/issues/6463

A short summary of the bug to be fixed in this PR, eLife Decision letter and Author response <sub-article> peer review articles previously had @id attribute values of SA1 and SA2, and these were used in the query selectors in Lens' elife_converter.js to find them.

In more recent eLife articles the @id values have gone lowercase, sa1 and sa2, which causes them to not display on Lens.

Initially we were planning to change the logic to look at the @article-type of the <sub-article> tag to determine whether the node should be assigned a heading of "Decision letter" or "Author response". After some consideration of how the <sub-article> tags could be processed in a loop, it looked to be easier to take the Lens node heading value from the <article-title> tag of the <sub-article>.

This should only affect eLife articles since we are only editing the converter/elife_converter.js file. The logic here should also be backwards compatible for all eLife articles based on the previously published article data I checked. It also does not cause any errors if there are no <sub-article> tags in the article XML.

@gnott gnott requested a review from NuclearRedeye March 25, 2021 00:30
@gnott gnott merged commit 1d7d003 into develop Mar 25, 2021
@gnott gnott deleted the elife-decision-letter branch March 25, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants